<template>
  <div class="bottom">
      <p v-for="(item,index) in tankList" :key="index" @click="dianji(index)" :class="{active:gaoliang==index}">{{item.text}}</p>
  </div>
</template>

<script>
export default {
    data(){
        return {
            gaoliang:0,
            tankList:[
                {text:'首页'},
                {text:'爆爆团'},
                {text:'订单'},
                {text:'我的'}
            ]
        }
    },
    methods:{
        dianji(index){
            // console.log(index);
            this.gaoliang=index
        }
    }
}
</script>

<style scoped>
  .bottom{
    height: 40px;
    width: 100%;
    background-color: beige;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  .bottom p{
    font-weight: 700;
  }
  .bottom p.active{
    color: orange;
  }
</style>